import java.util.Arrays;

public class MaoPao {
    public void maoPao(int[] a){
        for (int i = 0; i <a.length-1 ; i++) {
            for (int j = 0; j <a.length-1-i ; j++) {
                if(a[j]>a[j+1]){
                    int t = a[j+1];
                    a[j+1] = a[j];
                    a[j] = t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }

    public static void main(String[] args) {
        int[] arr = {10, 44, 23, 242, 111, 2, 0};
       new MaoPao().maoPao(arr);
    }
}
